<div class="page-body">
    <div class="row">
        <div class="col-xs-12 col-md-12">
            <div class="widget">
                <div class="widget-header
            <switch name="T_type">
                <case value="1">bg-magenta</case>
                <case value="2">bg-palegreen</case>
                <case value="3">bg-lightred</case>
                <case value="4">bg-blue</case>
                <case value="5">bg-blueberry</case>
                <case value="6">bg-gold</case>
                <default />bg-magenta
                </switch>
                                ">
                <span class="widget-caption">{$T_title|default=CONTROLLER_NAME}</span>
                                <!--Widget Buttons-->
            </div>
                <div class="widget-body">
                    <div class="table-toolbar">
                        <form method="get" action="{:U('index')}" class="form-inline" role="form">
                            <div class="form-group">
                            <span class="input-icon" style="width: 200px;">
                                <input type="text" class="form-control input-sm" placeholder="新华码、条码、ID、书名"
                                       name="keywords" value="{$Think.get.keywords}">
                                <i class="glyphicon glyphicon-search blue"></i>
                            </span>
                                <button type="submit" class="btn btn-info">搜索</button>
                            </div>
                        </form>
                    </div>
                    <table class="table table-bordered table-striped table-condensed flip-content">
                        <thead class="flip-content bordered-palegreen">
                        <tr>
                            <th>
                                ID
                            </th>
                            <th>
                                条码
                            </th>
                            <th>
                                书名
                            </th>
                            <th>
                                类别
                            </th>
                            <th>
                                定价
                            </th>
                            <th> 借阅库存</th>
                            <th> 购书库存</th>
                            <th>排序</th>
                        </tr>
                        </thead>

                        <tbody>
                        <foreach name="data" item="v">
                            <tr>
                                <td>
                                    {$v.book_id}
                                </td>
                                <td>
                                    条码：{$v.tm}<br>
                                    新华码：{$v.spbs}
                                </td>
                                <td>
                                    书名：{$v.sm}<br>
                                    作者：{$v.zyz}
                                </td>
                                <td>
                                    <foreach name="v.book_type" item="book_type">
                                        {$book_type.p_name}：{$book_type.name}<br>
                                    </foreach>
                                </td>
                                <td>
                                    ￥{$v.dj}
                                </td>
                                <td>
                                    {$v.stock_rent}本
                                    <!--<a class="btn btn-danger btn-xs del-btn" href="javascript:;"-->
                                       <!--data-href="{:U('del',array('book_id'=>$v['book_id']))}"><i-->
                                            <!--class="fa fa-trash-o"></i>库存清除</a>-->
                                </td>
                                <td>
                                    {$v.stock_buy}本
                                    <!--<a class="btn btn-danger btn-xs del-btn" href="javascript:;"-->
                                       <!--data-href="{:U('del',array('book_id'=>$v['book_id']))}">-->
                                        <!--<i class="fa fa-trash-o"></i>库存清除</a>-->
                                </td>
                                <td>{$v.sort}</td>
                            </tr>
                        </foreach>
                        </tbody>
                    </table>
                    {$page}
                    <form class="form-inline" method="post">
                        <div class="form-group">
                            <div class="input-group">
                                <div class="input-group-addon">设置页码</div>
                                <input class="form-control" type="text" placeholder="" name="p" value="{$Think.get.p}" style="width: 60px;">
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>